import request from '@/utils/request'

// 查询用户问答列表
export function listExam(query) {
  return request({
    url: '/business/exam/list',
    method: 'get',
    params: query
  })
}

// 查询用户问答详细
export function getExam(id) {
  return request({
    url: '/business/exam/' + id,
    method: 'get'
  })
}

// 查询用户考试题目详细
export function getExamTopic(id) {
  return request({
    url: '/business/exam/examTopic/' + id,
    method: 'get'
  })
}

// 新增用户问答
export function addExam(data) {
  return request({
    url: '/business/exam',
    method: 'post',
    data: data
  })
}

// 修改用户问答
export function updateExam(data) {
  return request({
    url: '/business/exam',
    method: 'put',
    data: data
  })
}

// 删除用户问答
export function delExam(id) {
  return request({
    url: '/business/exam/' + id,
    method: 'delete'
  })
}
